package com.woniu.airent.controller;

import com.woniu.airent.entity.Items;
import com.woniu.airent.service.ExreaService;
import com.woniu.airent.service.ItemsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("items")
public class ItemsConreoller {


    @Autowired
    ItemsService itemsService;

    @RequestMapping("/showHouseItems")
    @ResponseBody
    public List<Items> showHourseItems(){
        List<Items> itemsList = itemsService.showHouseItems();
        return itemsList;
    }
}
